package com.imooc.o2o.util;/**
 * @package: com.imooc.o2o.util
 * @data: 2018/8/21
 * @author: 70918
 */

/**
 * @author ：zglx
 * Date       ：Created in 23:53 2018/8/21
 * Description：TODO
 * version:     V1.0
 */
public class PathUtil {
    private static String separator = System.getProperty("file.separator");
    public static String getImgBasePath() {
        String os = System.getProperty("os.name");
        String basePath = "";
        if (os.toLowerCase().startsWith("win")) {
            basePath = "C:/Users/70918/Desktop/";
        } else {
            basePath = "/home/cassail/";
        }
        basePath = basePath.replace("/", separator);
        return basePath;
    }

    public static String getShopImagePath(long shopId) {
        String imagePath = "upload/item/shop/" + shopId + "/";
        return imagePath.replace("/", separator);
    }
}
